package com.lm.grizzly.config;

import org.glassfish.grizzly.http.server.*;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

//@Configuration
//public class GrizzlyConfig {
//
//    @Bean(initMethod = "start", destroyMethod = "shutdownNow")
//    public HttpServer grizzlyServer() {
//        HttpServer server = new HttpServer();
//        NetworkListener listener = new NetworkListener("grizzly", "0.0.0.0", 8080);
//        server.addListener(listener);
//
//        server.getServerConfiguration().addHttpHandler(new HttpHandler() {
//            @Override
//            public void service(Request request, Response response) throws Exception {
//                response.getWriter().write("Hello, Grizzly + Spring Boot 🚀");
//            }
//        }, "/hello");
//
//        return server;
//    }
//}
